Optimal. Leaf size=72 \[ \frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d}+\frac {b^2 \log (\sin (c+d x))}{a^3 d}-\frac {b^2 \log (a+b \sin (c+d x))}{a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2912, 12, 46}
\begin {gather*} \frac {b^2 \log (\sin (c+d x))}{a^3 d}-\frac {b^2 \log (a+b \sin (c+d x))}{a^3 d}+\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 46
Rule 2912
Rubi steps
\begin {align*} \int \frac {\cot (c+d x) \csc ^2(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {b^3}{x^3 (a+x)} \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {b^2 \text {Subst}\left (\int \frac {1}{x^3 (a+x)} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^2 \text {Subst}\left (\int \left (\frac {1}{a x^3}-\frac {1}{a^2 x^2}+\frac {1}{a^3 x}-\frac {1}{a^3 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d}+\frac {b^2 \log (\sin (c+d x))}{a^3 d}-\frac {b^2 \log (a+b \sin (c+d x))}{a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 72, normalized size = 1.00 \begin {gather*} \frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d}+\frac {b^2 \log (\sin (c+d x))}{a^3 d}-\frac {b^2 \log (a+b \sin (c+d x))}{a^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 65, normalized size = 0.90
method | result | size |
derivativedivides | \(\frac {-\frac {1}{2 a \sin \left (d x +c \right )^{2}}+\frac {b^{2} \ln \left (\sin \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \sin \left (d x +c \right )}-\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3}}}{d}\) | \(65\) |
default | \(\frac {-\frac {1}{2 a \sin \left (d x +c \right )^{2}}+\frac {b^{2} \ln \left (\sin \left (d x +c \right )\right )}{a^{3}}+\frac {b}{a^{2} \sin \left (d x +c \right )}-\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3}}}{d}\) | \(65\) |
risch | \(\frac {2 i \left (-i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{3 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{3} d}-\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a^{3} d}\) | \(122\) |
norman | \(\frac {-\frac {1}{8 a d}-\frac {\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a^{2} d}+\frac {b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a^{2} d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {b^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{3} d}-\frac {b^{2} \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{a^{3} d}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 66, normalized size = 0.92 \begin {gather*} -\frac {\frac {2 \, b^{2} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3}} - \frac {2 \, b^{2} \log \left (\sin \left (d x + c\right )\right )}{a^{3}} - \frac {2 \, b \sin \left (d x + c\right ) - a}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 100, normalized size = 1.39 \begin {gather*} -\frac {2 \, a b \sin \left (d x + c\right ) - a^{2} + 2 \, {\left (b^{2} \cos \left (d x + c\right )^{2} - b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - 2 \, {\left (b^{2} \cos \left (d x + c\right )^{2} - b^{2}\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right )}{2 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos {\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 71, normalized size = 0.99 \begin {gather*} -\frac {\frac {2 \, b^{2} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3}} - \frac {2 \, b^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{3}} - \frac {2 \, a b \sin \left (d x + c\right ) - a^{2}}{a^{3} \sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.79, size = 132, normalized size = 1.83 \begin {gather*} \frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}-\frac {b^2\,\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{a^3\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a}{2}-2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a^2\,d}+\frac {b^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________